﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="web_uchet.Security.Enums" %>
<%web_uchet.Security.ProgramContext MData = ViewData["Master"] as web_uchet.Security.ProgramContext;%>
<td align="left" id="pager_left">
        <table cellspacing="0" cellpadding="0" border="0" style="float: left; table-layout: auto;" class="ui-pg-table navtable">
        <tbody>
            <tr>
            <% if (MData.Roles.Contains(UserRoleEnum.Администратор) || MData.Roles.Contains(UserRoleEnum.Менеджер))
               {%>
            <td class="ui-pg-button ui-corner-all" title="Добавление нового клиента" style="cursor: pointer;">
                <div class="ui-pg-div" onclick="Create();">
                <span class="ui-icon ui-icon ui-icon-carat-1-e"></span>Новый 
                </div>
            </td>
             <td style="width: 4px;" class="ui-pg-button ui-state-disabled">
                <span class="ui-separator"></span>
            </td>
            <td class="ui-pg-button ui-corner-all" title="Правка данных клиента" style="cursor: pointer;">
                <div class="ui-pg-div" onclick="Edit();">
                <span class="ui-icon ui-icon ui-icon-carat-1-e"></span>Правка 
                </div>
            </td>
             <td style="width: 4px;" class="ui-pg-button ui-state-disabled">
                <span class="ui-separator"></span>
            </td>            
            <%} %>

            <td class="ui-pg-button ui-corner-all" title="Показать детальную информацию о клиенте" style="cursor: pointer;">
                <div class="ui-pg-div" onclick="Details();">
                <span class="ui-icon ui-icon ui-icon-carat-1-e"></span>Детали 
                </div>
            </td>
            <td class="ui-pg-button ui-corner-all" title="Показать заказы клиента" style="cursor: pointer;">
                <div class="ui-pg-div" onclick="ClientOrders();">
                <span class="ui-icon ui-icon ui-icon-carat-1-e"></span>Заказы клиента 
                </div>
            </td>
            <td style="width: 4px;" class="ui-pg-button ui-state-disabled">
                <span class="ui-separator"></span>
            </td>           
            <% if (MData.Roles.Contains(UserRoleEnum.Администратор)){ %>
            <td class="ui-pg-button ui-corner-all" title="Удаление клиента" style="cursor: pointer;">
                <div class="ui-pg-div" onclick="Delete();">
                <span class="ui-icon ui-icon ui-icon-carat-1-e"></span>Удалить 
                </div>
            </td>
             <td style="width: 4px;" class="ui-pg-button ui-state-disabled">
                <span class="ui-separator"></span>
            </td>
            <%} %>          
            </tr>
        </tbody></table>
    </td>
